var menu=document.getElementsByClassName("menu")[0];
var menubtn=document.getElementsByClassName("icon-menu-two")[0];
var j=0;
menubtn.onclick=function(){
	j++;
	if(j%2==1){
		menu.style.marginLeft="0";
	}else{
		menu.style.marginLeft="-100%";
	}
}

function xxk(parent){
	this.lis=parent.getElementsByTagName("li");
	this.mins=parent.getElementsByClassName("plate3_min");
	this.bigbox5=parent.querySelector(".plate5>.container>.plate_3_2");
	this.xxk5=parent.querySelectorAll(".plate5>.container>.plate_3_1>ul li");
}
xxk.prototype.init=function(){
	this.bind();
}
xxk.prototype.bind=function(){
	var me=this;
	for(i=0;i<this.lis.length;i++){
		this.lis[i].onclick=function(){
			me.animate(this);
		}
	}
}
xxk.prototype.animate=function(li){
	var i=li.getAttribute("dy");
	for(j=0;j<this.lis.length;j++){
		this.lis[j].className="";
		this.mins[j].style.display="none";
	}
	this.lis[i].className="active1";
	this.mins[i].style.display="block";
	
	if(this.xxk5[1].className=="active1"){
		this.bigbox5.style.height="410px";
	}else if(this.xxk5[2].className=="active1"){
		this.bigbox5.style.height="70px";
	}else if(this.xxk5[3].className=="active1"){
		this.bigbox5.style.height="70px";
	}else if(this.xxk5[0].className=="active1"){
		this.bigbox5.style.height="140px";
	}
	
	
}
var max=document.getElementsByClassName("plate3")[0];
var dxxk=new xxk(max);
dxxk.init();
var max2=document.getElementsByClassName("plate5")[0];
var dxxk2=new xxk(max2);
dxxk2.init();



var btn5=document.getElementsByClassName("icon-hao");
for(i=0;i<btn5.length;i++){
	btn5[i].onclick=function(){
		if(this.parentNode.nextElementSibling.style.opacity=="0"){
			this.parentNode.nextElementSibling.style.opacity="1";
			this.parentNode.parentNode.style.height="94px";
			var h=window.getComputedStyle(this.parentNode.parentNode.parentNode.parentNode).getPropertyValue('height');
			h=parseInt(h)+90;
			this.parentNode.parentNode.parentNode.parentNode.style.height=h+"px";
			this.parentNode.lastElementChild.className="iconfont icon-023caozuo_jianhao";
		}else{
			this.parentNode.nextElementSibling.style.opacity="0";
			this.parentNode.parentNode.style.height="30px";
			var h=window.getComputedStyle(this.parentNode.parentNode.parentNode.parentNode).getPropertyValue('height');
			h=parseInt(h)-90;
			this.parentNode.parentNode.parentNode.parentNode.style.height=h+"px";
			this.parentNode.lastElementChild.className="iconfont icon-hao";
		}
		
		
	}
}

var xl=document.getElementsByClassName("lxmj")[0];
var xx=document.getElementsByClassName("xx")[0];
var xlmodal=document.getElementsByClassName("modal_fixed")[0];
xl.onclick=function(){
	console.log(1)
	if(xlmodal.style.display=="none"){
		xlmodal.style.display="block"
	}
}
xx.onclick=function(){
	if(xlmodal.style.display=="block"){
		xlmodal.style.display="none"
	}
}

var xl2=document.getElementsByClassName("lxmj")[1];
var xx2=document.getElementsByClassName("xx")[1];
var xlmodal2=document.getElementsByClassName("modal_fixed")[1];
xl2.onclick=function(){
	console.log(1)
	if(xlmodal2.style.display=="none"){
		xlmodal2.style.display="block"
	}
}
xx2.onclick=function(){
	if(xlmodal2.style.display=="block"){
		xlmodal2.style.display="none"
	}
}




